package com.zhiyin.seal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhiyin.seal.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface StampDao extends BaseMapper {

    Integer insertStampRecord(@Param("stampRecord") StampRecordEntity stampRecordEntity);

    Integer insertStampRecordDetail(@Param("recordList") List<StampRecordDetailEntity> stampRecordDetailEntityList);

    Integer insertApplyStampImages(@Param("photoList") List<ApplyPhotoEntity> applyPhotoEntityList);

    Long selectStampRecordTotalCount(@Param("paramsEntity") StampSearchParamsEntity stampSearchParamsEntity);

    List<StampRecordEntity> selectStampRecordList(@Param("paramsEntity") StampSearchParamsEntity stampSearchParamsEntity);

    List<StampRecordEntity> selectStampRecordListByApplyId(@Param("applyId") Long applyId);

    List<ApplyEntity> selectStampRecordApplyList(@Param("paramsEntity") StampSearchParamsEntity stampSearchParamsEntity);

    Integer deleteStampImage(@Param("imageUrl") String imageUrl);

    List<String> selectStampImageList(@Param("applyId") Long applyId);

    StampRecordEntity selectStampRecordById(@Param("startId") Long startId);

    List<StampRecordDetailEntity> selectRecordDetailList(@Param("startId") Long startId);

    Integer insertStampRecordFingerprint(@Param("record") StampRecordFingerprintEntity stampRecordFingerprintEntity);

    List<StampRecordFingerprintEntity> selectFingerprintRecordList(@Param("mac") String mac,@Param("code") Integer code);

    Integer selectStampCount();
}